package com.plan.dao.service.card.impl;

import com.plan.dao.mapper.user.TeamUserMapper;
import com.plan.dao.service.card.TeamDaoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TeamDaoServiceImpl implements TeamDaoService {
    @Resource
    TeamUserMapper teamUserMapper;

    @Override
    public boolean isUserInTeam(Long teamId, Long userId) {
        int count = teamUserMapper.checkUserTeamExists(teamId, userId);
        return count > 0;
    }

}
